home *** CD-ROM | disk | FTP | other *** search
/ Chip 2001 December / Chip_2001-12_cd1.bin / zkuste / tuning / download / xteq / setup.exe / {app} / plugins / XQ WinXP NTP Update.xpl < prev    next >
Text File  |  2001-05-05  |  2KB  |  59 lines

  1. "FILE"="Xteq Systems X-Setup Plugin 6.0"
  2. "TYPE"="2"
  3. "COUNT"="1"
  4. "UIPATH 1"="Network\Network Time Protocol"
  5. "NAME"="NTP Update Interval"
  6. "VERSION"="1.04"
  7. "OSVersion"="000001"
  8. "LANGUAGE"="VBScript"
  9. "TEXT 1"="Interval (min)"
  10. "DESCRIPTION 1"="Specifies your the update interval of the configured NTP server. (NTP = Windows will automatically set your computer's clock to synchronize with the remote server's clock)."
  11. "DESCRIPTION 2"="For example, if you have an computer which looses time very fast and have an permanent connection to the internet, you could configure this interval to be 60 which means One Update per hour."
  12. "AUTHOR"="Xteq Systems"
  13. "CONTACTURL"="http://www.xteq.com/"
  14. "COPYRIGHT"="Copyright ⌐ Xteq Systems - All Rights Reserved"
  15. "COMMENT 1"="No time like the present."
  16.  
  17.  
  18.  
  19. sPath="HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Config\UpdateInterval"
  20.  
  21. Sub Plugin_Initialize 
  22.  s=RegReadValue(sPath)
  23.  if IsEmpty(s) then
  24.     Call SetUIElement(1,"")
  25.  else
  26.     If IsNumeric(s)=true then
  27.        l=CLng(s)
  28.        l=l/10   '=seconds
  29.        l=l/60   '=minutes
  30.        Call SetUIElement(1,l)
  31.     end if
  32.  end if
  33.  
  34. End Sub
  35.  
  36. Sub Plugin_CheckData(ElementIndex)
  37. End Sub
  38.  
  39. Sub Plugin_Apply(ElementIndex,ElementSubIndex)
  40.  s=GetUIElement(1)
  41.  if len(s)=0 then
  42.     if RegValueExists(sPath) then RegDeleteValue(sPath)
  43.  else
  44.     if IsNumeric(s)=false then
  45.        Call MsgError("Please use a valid numeric value!")
  46.     else
  47.       l=Clng(s)
  48.       l=l*60 'seconds
  49.       l=l*10 'ms
  50.  
  51.       Call RegWriteValue(sPath,l,2)
  52.     end if 
  53.  end if
  54.  
  55. End Sub
  56.  
  57. Sub Plugin_Terminate 
  58. End Sub
  59.